package gruppe7.data;

/**
 * Simpel entitet beskrivende en bruger. Bruges til session, se bl.a. main_links.jsp
 */
public class User {

    public static enum Type {

        TYPE_ADMIN, TYPE_REGULAR;
    };
    private String username;
    private User.Type type;
    private final int userID;

    public User(String username, User.Type type, int userID) {
        this.userID = userID;
        this.username = username;
        this.type = type;
       
    }

    public String getUsername() {
        return username;
    }

    public User.Type getType() {
        return type;
    }

    public boolean isAdminUser() {
        return type == User.Type.TYPE_ADMIN;
    }

    public int getUserID() {
        return userID;
    }
}
